import copy
import queue

def queue2list(q):
    ret = []
    while q.empty() is False:
        ret.append(q.get())
    for item in ret:
        q.put(item)
    return ret

def list2queue(list):
    q = queue.Queue()
    for item in list:
        q.put(item)
    return q

if __name__ == '__main__':
    q = queue.Queue()
    q.put('1')
    q.put('2')
    print(queue2list(q))
